package com.fac.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
 * 设备使用统计VO
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(description = "设备使用统计返回对象")
public class EquipmentUsageVO implements Serializable {

    @ApiModelProperty(value = "设备总数", example = "100")
    private Integer totalEquipment;

    @ApiModelProperty(value = "使用中设备数量", example = "60")
    private Integer inUseCount;

    @ApiModelProperty(value = "维修中设备数量", example = "10")
    private Integer maintenanceCount;

    @ApiModelProperty(value = "闲置设备数量", example = "30")
    private Integer idleCount;

    @ApiModelProperty(value = "设备使用率", example = "0.6")
    private Double usageRate;

    @ApiModelProperty(value = "分类使用情况")
    private List<CategoryUsage> categoryUsage;

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    @ApiModel(description = "设备分类使用情况")
    public static class CategoryUsage implements Serializable {

        @ApiModelProperty(value = "分类名称", example = "加工设备")
        private String categoryName;

        @ApiModelProperty(value = "设备数量", example = "50")
        private Integer count;

        @ApiModelProperty(value = "使用率", example = "0.8")
        private Double usageRate;
    }
} 